<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
    <h4 class="modal-title" id="ntModalLabel">{:lang('my_profile')}</h4>
</div>
<form class="modal-body formbox">
        <div class="row clearfix">
                <div class="col-md-12 column">
                    <div class="alert alert-dismissable alert-info">
                        <button type="button" class="close">×</button>
                        <p></p>
                    </div>
                </div>
            </div>
    <div class="row clearfix">
        <div class="col-md-12 column">
            <ul class="nav nav-tabs">
                <li class="active">
                    <a href="#myinfo_table_base" data-toggle="tab">{:lang('basic_information')}</a>
                </li>
                <li>
                    <a href="#myinfo_table_person" data-toggle="tab">{:lang('personal_information')}</a>
                </li>
            </ul>
        </div>
    </div>
    <div class="row clearfix tab-content">
        <div class="col-md-12 tab-pane in active" id="myinfo_table_base">
            <table class="table table-striped table-hover ntTable">
                <tbody>
                <tr>
                    <td>{:lang('nickname')}</td>
                    <td>{$info.nickname|default=''}</td>
                    <td>{:lang('default_language')}</td>
                    <td>
                        <select class="form-control" name="language_id">
                            <option value="">{:lang('please_select')}</option>
                            {volist name="$info.langdata" id="vo"}
                            {eq name="$key" value="$info.language_id|default=''"}
                            <option value="{$key}" selected>{$vo}</option>
                            {else/}
                            <option value="{$key}">{$vo}</option>
                            {/eq}
                            {/volist}
                        </select>
                    </td>
                </tr>
                <tr>
                    <td>{:lang('department')}</td>
                    <td>{$info.framnames|default=''}</td>
                    <td>{:lang('job')}</td>
                    <td>{$info.posnames|default=''}</td>
                </tr>
                <tr>
                    <td>{:lang('login_address')}</td>
                    <td>{$info.loginip|default=''}<br>{$info.loginipaddress|default=''}</td>
                    <td>{:lang('last_login')}</td>
                    <td>{$info.login_time|default=''}</td>
                </tr>
                </tbody>
            </table>
        </div>
        <div class="col-md-12 tab-pane" id="myinfo_table_person">
            <table class="table table-striped table-hover ntTable">
                <tbody>
                <tr>
                    <td>{:lang('name')}</td>
                    <td colspan="3">{$info.username|default=''}</td>
                </tr>
                <tr>
                    <td>{:lang('gender')}</td>
                    <td>{$info.sex|default=''}</td>
                    <td>{:lang('marital_status')}</td>
                    <td>{$info.marry|default=''}</td>
                </tr>
                <tr>
                    <td>{:lang('brithday')}</td>
                    <td>{$info.birthday_date|default=''}</td>
                    <td>{:lang('education')}</td>
                    <td>{$info.education|default=''}</td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
    <input type="hidden" name="nickname" value="{$info.nickname|default=''}">
</form>
<div class="modal-footer">
    <button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span>{:lang('cancel')}
    </button>
    <button type="button" id="quedin" class="btn btn-primary" style="padding-left:24px;padding-right:24px"><span
            class="glyphicon glyphicon-floppy-disk"></span>{:lang('save')}
    </button>
</div>
<script>
    //数据的提交
    $('#quedin').click(subfn)
    var addbm = true;
    function subfn() {
        if (addbm) {
            $.ajax({
                url: '/Admin/login/personalmeans',
                type: 'post',
                data: $(".formbox").serialize(),
                dataType: 'json',
                success: function (res) {
                    if (res.status != 1) {
                        change_mes_type('.modal-body .alert',res.status)
                        $('.modal-body .alert').show()
                        $('.modal-body .alert p').html('*' + res.msg + '<br>')
                    } else {
                        addbm = false
                        change_mes_type('.alert',res.status)
                        $('.alert').show()
                        $('.alert p').html('*' + res.msg + '<br>')
                        $('#myinfo_editModal').modal('hide')
                    }
                }
            });
        }
    }
    $(document).keydown(function (event) {
        if (event.keyCode == 13) {
            $('form').each(function () {
                event.preventDefault();
            });
            subfn()
        }
    });
</script>